home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / Emilia.swf / scripts / frame_13 / DoAction.as
Encoding:
Text File  |  2011-12-21  |  5.5 KB  |  175 lines

  1. function top()
  2. {
  3.    for(var _loc3_ in _root.top_win.top_btn)
  4.    {
  5.       trace(_root.top_win.top_btn[_loc3_]);
  6.       if(typeof _root.top_win.top_btn[_loc3_] == "movieclip")
  7.       {
  8.          if(_root.top_win.top_btn[_loc3_]._name.substr(0,3) == "top")
  9.          {
  10.             _root.top_win.top_btn[_loc3_].onRelease = function()
  11.             {
  12.                var num = Number(this._name.substr(3,2));
  13.                trace(num);
  14.                Mouse.hide();
  15.                this._visible = false;
  16.                _root.cur1_mc.gotoAndStop(num + 1);
  17.                this.onMouseDown = function()
  18.                {
  19.                   sound_ini3();
  20.                   _root.model_mc.model_tops_mc.gotoAndStop(num + 1);
  21.                   _root.cur1_mc.gotoAndStop(1);
  22.                   Mouse.show();
  23.                   this._visible = true;
  24.                   delete this.onMouseDown;
  25.                };
  26.             };
  27.          }
  28.       }
  29.    }
  30.    for(_loc3_ in _root.bottoms_win.bottoms_btn)
  31.    {
  32.       trace(_root.bottoms_win.bottoms_btn[_loc3_]);
  33.       if(typeof _root.bottoms_win.bottoms_btn[_loc3_] == "movieclip")
  34.       {
  35.          if(_root.bottoms_win.bottoms_btn[_loc3_]._name.substr(0,7) == "bottoms")
  36.          {
  37.             _root.bottoms_win.bottoms_btn[_loc3_].onRelease = function()
  38.             {
  39.                var num = Number(this._name.substr(7,2));
  40.                Mouse.hide();
  41.                this._visible = false;
  42.                _root.cur2_mc.gotoAndStop(num + 1);
  43.                this.onMouseDown = function()
  44.                {
  45.                   sound_ini3();
  46.                   _root.model_mc.model_bottoms_mc.gotoAndStop(num + 1);
  47.                   _root.cur2_mc.gotoAndStop(1);
  48.                   Mouse.show();
  49.                   this._visible = true;
  50.                   delete this.onMouseDown;
  51.                };
  52.             };
  53.          }
  54.       }
  55.    }
  56.    for(_loc3_ in _root.fs_win.fs_btn)
  57.    {
  58.       trace(_root.fs_win.fs_btn[_loc3_]);
  59.       if(typeof _root.fs_win.fs_btn[_loc3_] == "movieclip")
  60.       {
  61.          if(_root.fs_win.fs_btn[_loc3_]._name.substr(0,2) == "fs")
  62.          {
  63.             _root.fs_win.fs_btn[_loc3_].onRelease = function()
  64.             {
  65.                var num = Number(this._name.substr(3,2));
  66.                if(_root.model_mc.wa_mc._currentframe == 2 && num == 6)
  67.                {
  68.                   _root.model_mc.wa_mc.gotoAndStop(1);
  69.                }
  70.                else
  71.                {
  72.                   Mouse.hide();
  73.                   this._visible = false;
  74.                   _root.cur4_mc.gotoAndStop(num + 1);
  75.                   this.onMouseDown = function()
  76.                   {
  77.                      sound_ini3();
  78.                      if(num < 4)
  79.                      {
  80.                         _root.model_mc.model_shoes2_mc.gotoAndStop(num + 1);
  81.                         _root.model_mc.model_shoes_mc.gotoAndStop(1);
  82.                      }
  83.                      else if(num == 6)
  84.                      {
  85.                         _root.model_mc.wa_mc.gotoAndStop(2);
  86.                      }
  87.                      else
  88.                      {
  89.                         _root.model_mc.model_shoes_mc.gotoAndStop(num + 1);
  90.                         _root.model_mc.model_shoes2_mc.gotoAndStop(1);
  91.                      }
  92.                      _root.cur4_mc.gotoAndStop(1);
  93.                      Mouse.show();
  94.                      this._visible = true;
  95.                      delete this.onMouseDown;
  96.                   };
  97.                }
  98.             };
  99.          }
  100.       }
  101.    }
  102.    for(_loc3_ in _root.dp_win.dp_btn)
  103.    {
  104.       trace(_root.dp_win.dp_btn[_loc3_]);
  105.       if(typeof _root.dp_win.dp_btn[_loc3_] == "movieclip")
  106.       {
  107.          if(_root.dp_win.dp_btn[_loc3_]._name.substr(0,2) == "dp")
  108.          {
  109.             _root.dp_win.dp_btn[_loc3_].onRelease = function()
  110.             {
  111.                var num = Number(this._name.substr(3,2));
  112.                if(_root.model_mc.dp_mc._currentframe == num + 1)
  113.                {
  114.                   _root.model_mc.dp_mc.gotoAndStop(1);
  115.                }
  116.                else
  117.                {
  118.                   Mouse.hide();
  119.                   this._visible = false;
  120.                   _root.cur6_mc.gotoAndStop(num + 1);
  121.                   this.onMouseDown = function()
  122.                   {
  123.                      sound_ini3();
  124.                      _root.model_mc.dp_mc.gotoAndStop(num + 1);
  125.                      _root.cur6_mc.gotoAndStop(1);
  126.                      Mouse.show();
  127.                      this._visible = true;
  128.                      delete this.onMouseDown;
  129.                   };
  130.                }
  131.             };
  132.          }
  133.       }
  134.    }
  135. }
  136. function play_again_fun()
  137. {
  138.    var _loc2_ = 0;
  139.    while(_loc2_ <= change_mc_array.length)
  140.    {
  141.       this.model_mc[change_mc_array[_loc2_]].gotoAndStop(1);
  142.       _loc2_ = _loc2_ + 1;
  143.    }
  144. }
  145. function girl1()
  146. {
  147.    if(this.model_mc.x0 and this.model_mc.y0)
  148.    {
  149.       this.model_mc._x = this.model_mc.x0;
  150.       this.model_mc._y = this.model_mc.y0;
  151.       this.model_mc._xscale = this.model_mc._yscale = 90;
  152.       this.model_mc._rotation = 0;
  153.    }
  154. }
  155. function sound_ini3()
  156. {
  157.    _root.bg3_sound = new Sound();
  158.    _root.bg3_sound.attachSound("s3");
  159.    _root.bg3_sound.start();
  160.    _root.bg3_sound.setVolume(100);
  161. }
  162. stop();
  163. this.onEnterFrame = function()
  164. {
  165.    var _loc2_ = 1;
  166.    while(_loc2_ <= 7)
  167.    {
  168.       _root["cur" + _loc2_ + "_mc"]._x = _xmouse;
  169.       _root["cur" + _loc2_ + "_mc"]._y = _ymouse;
  170.       _loc2_ = _loc2_ + 1;
  171.    }
  172. };
  173. top();
  174. girl1();
  175.